<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>TURN Server: turn::StunMsg Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">TURN Server
   &#160;<span id="projectnumber">1.5</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceturn.html">turn</a>      </li>
      <li class="navelem"><a class="el" href="classturn_1_1StunMsg.html">StunMsg</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">turn::StunMsg Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for turn::StunMsg:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classturn_1_1StunMsg.png" usemap="#turn::StunMsg_map" alt=""/>
  <map id="turn::StunMsg_map" name="turn::StunMsg_map">
<area href="classturn_1_1StunMsgChannel.html" alt="turn::StunMsgChannel" shape="rect" coords="0,56,144,80"/>
<area href="classturn_1_1StunMsgIndication.html" alt="turn::StunMsgIndication" shape="rect" coords="154,56,298,80"/>
<area href="classturn_1_1StunMsgRequest.html" alt="turn::StunMsgRequest" shape="rect" coords="308,56,452,80"/>
<area href="classturn_1_1StunMsgResponse.html" alt="turn::StunMsgResponse" shape="rect" coords="462,56,606,80"/>
</map>
 </div></div>

<p><a href="classturn_1_1StunMsg-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a96595cee419124a84d6bfa73407da683"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a96595cee419124a84d6bfa73407da683">StunMsg</a> ()</td></tr>
<tr class="memitem:adb103ee966a4fbe46ae6496afcd20b2b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#adb103ee966a4fbe46ae6496afcd20b2b">StunMsg</a> (u08bits *buffer, size_t total_sz, size_t sz, bool constructed)</td></tr>
<tr class="memitem:adb46577dfeff028f10e40b699b3c6b3f"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#adb46577dfeff028f10e40b699b3c6b3f">~StunMsg</a> ()</td></tr>
<tr class="memitem:abb2d8ac6f2849f158d58a6405c275f54"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#abb2d8ac6f2849f158d58a6405c275f54">construct</a> ()</td></tr>
<tr class="memitem:aec1db3118494fb6edc6dc1de9fa06b09"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#aec1db3118494fb6edc6dc1de9fa06b09">isValid</a> ()</td></tr>
<tr class="memitem:ad38c6413489bc2da2e97b661969a5df4"><td class="memItemLeft" align="right" valign="top">u08bits *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#ad38c6413489bc2da2e97b661969a5df4">getRawBuffer</a> ()</td></tr>
<tr class="memitem:a0729732bfa90be8239a4c662cf24f0af"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a0729732bfa90be8239a4c662cf24f0af">getSize</a> () const </td></tr>
<tr class="memitem:a9daf40e77846a41fe503387285d73a01"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a9daf40e77846a41fe503387285d73a01">setSize</a> (size_t sz)  throw (WrongStunBufferFormatException)</td></tr>
<tr class="memitem:ac4eb10588a98f213876635943bdb358c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#ac4eb10588a98f213876635943bdb358c">isCommand</a> () const </td></tr>
<tr class="memitem:ad187176401ef8f1a7a09caef24aeb510"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#ad187176401ef8f1a7a09caef24aeb510">addAttr</a> (<a class="el" href="classturn_1_1StunAttr.html">StunAttr</a> &amp;attr)  throw (WrongStunAttrFormatException, WrongStunBufferFormatException)</td></tr>
<tr class="memitem:aaf2fca4a2160e482b64c6cc076084124"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="structstun__tid.html">stun_tid</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#aaf2fca4a2160e482b64c6cc076084124">getTid</a> () const   throw (WrongStunBufferFormatException)</td></tr>
<tr class="memitem:afd4f7f0ed495aa38cb005742cbac1991"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#afd4f7f0ed495aa38cb005742cbac1991">setTid</a> (<a class="el" href="structstun__tid.html">stun_tid</a> &amp;tid)  throw (WrongStunBufferFormatException)</td></tr>
<tr class="memitem:a3c4002d2c562f1137324c9d302e8e8e2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a3c4002d2c562f1137324c9d302e8e8e2">addFingerprint</a> ()  throw (WrongStunBufferFormatException)</td></tr>
<tr class="memitem:af76ec74762ba24d09beef357fee27369"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#af76ec74762ba24d09beef357fee27369">checkMessageIntegrity</a> (std::string &amp;uname, std::string &amp;realm, std::string &amp;upwd) const   throw (WrongStunBufferFormatException)</td></tr>
<tr class="memitem:ae3344d108a2e688e2633b40d835ba9ec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#ae3344d108a2e688e2633b40d835ba9ec">addMessageIntegrity</a> (std::string &amp;uname, std::string &amp;realm, std::string &amp;upwd, std::string &amp;nonce)  throw (WrongStunBufferFormatException)</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ac862fc959f44ef8287e6374e55580a0d"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#ac862fc959f44ef8287e6374e55580a0d">isCommand</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:a4cf1d3727ffd8e2c09e834f30c91db30"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a4cf1d3727ffd8e2c09e834f30c91db30">isIndication</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:a9d9c109a0dcb34c63282c2990b4e3616"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a9d9c109a0dcb34c63282c2990b4e3616">isRequest</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:aa4c2c43d46e7fa788a0fa40e1ad38aa4"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#aa4c2c43d46e7fa788a0fa40e1ad38aa4">isSuccessResponse</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:a208cd843b0457ca8b7282d64fde0b0d1"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a208cd843b0457ca8b7282d64fde0b0d1">isErrorResponse</a> (u08bits *buffer, size_t sz, int &amp;err_code, u08bits *err_msg, size_t err_msg_size)</td></tr>
<tr class="memitem:a652f008b8556b550184be4c1f7126129"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a652f008b8556b550184be4c1f7126129">isChallengeResponse</a> (const u08bits *buf, size_t sz, int &amp;err_code, u08bits *err_msg, size_t err_msg_size, u08bits *realm, u08bits *nonce)</td></tr>
<tr class="memitem:ad3afc9794256ca780b3b2446b668af78"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#ad3afc9794256ca780b3b2446b668af78">isChannel</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:a86040d4a52cc5748adaef171dc130f43"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a86040d4a52cc5748adaef171dc130f43">isFingerprintPresent</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:a82e38b948a20bbd09d59fa74463edb3a"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a82e38b948a20bbd09d59fa74463edb3a">checkFingerprint</a> (u08bits *buffer, size_t sz)</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a15530c575e485a35f4d87ba7e117d195"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a15530c575e485a35f4d87ba7e117d195">constructBuffer</a> ()=0</td></tr>
<tr class="memitem:a9c6452d0d71052a0bda4ded876cc43ea"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a9c6452d0d71052a0bda4ded876cc43ea">check</a> ()=0</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a0222f924d9fc1b9b268ba87c459dd7fd"><td class="memItemLeft" align="right" valign="top">u08bits *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a></td></tr>
<tr class="memitem:a52a1a6acd969948c4c589b0023091cbb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#a52a1a6acd969948c4c589b0023091cbb">_deallocate</a></td></tr>
<tr class="memitem:aa66cd88412cd71f7edaf5189eba2ab44"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#aa66cd88412cd71f7edaf5189eba2ab44">_allocated_sz</a></td></tr>
<tr class="memitem:aa3c270c8abbdd22abe101907248754a9"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">_sz</a></td></tr>
<tr class="memitem:ac00be2fea5b4ab929ea6078871ec33d8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunMsg.html#ac00be2fea5b4ab929ea6078871ec33d8">_constructed</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Generic "STUN Message" class, base class for all messages </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00565">565</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a96595cee419124a84d6bfa73407da683"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classturn_1_1StunMsg.html#a96595cee419124a84d6bfa73407da683">turn::StunMsg::StunMsg</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Empty constructor </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00570">570</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                  {
                <a class="code" href="classturn_1_1StunMsg.html#aa66cd88412cd71f7edaf5189eba2ab44">_allocated_sz</a> = 0xFFFF;
                <a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a> = (u08bits*)turn_malloc(<a class="code" href="classturn_1_1StunMsg.html#aa66cd88412cd71f7edaf5189eba2ab44">_allocated_sz</a>);
                <a class="code" href="classturn_1_1StunMsg.html#a52a1a6acd969948c4c589b0023091cbb">_deallocate</a> = <span class="keyword">true</span>;
                <a class="code" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">_sz</a> = 0;
                <a class="code" href="classturn_1_1StunMsg.html#ac00be2fea5b4ab929ea6078871ec33d8">_constructed</a> = 0;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="adb103ee966a4fbe46ae6496afcd20b2b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classturn_1_1StunMsg.html#a96595cee419124a84d6bfa73407da683">turn::StunMsg::StunMsg</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>total_sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>constructed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Construct message over raw buffer. Parameter "construct" is true if the buffer is initialized. </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00582">582</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                               :
                <a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a>(buffer), <a class="code" href="classturn_1_1StunMsg.html#a52a1a6acd969948c4c589b0023091cbb">_deallocate</a>(<span class="keyword">false</span>), <a class="code" href="classturn_1_1StunMsg.html#aa66cd88412cd71f7edaf5189eba2ab44">_allocated_sz</a>(total_sz),
                <a class="code" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">_sz</a>(sz), <a class="code" href="classturn_1_1StunMsg.html#ac00be2fea5b4ab929ea6078871ec33d8">_constructed</a>(constructed) {}
</pre></div>
</div>
</div>
<a class="anchor" id="adb46577dfeff028f10e40b699b3c6b3f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classturn_1_1StunMsg.html#adb46577dfeff028f10e40b699b3c6b3f">turn::StunMsg::~StunMsg</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00589">589</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                           {
                <span class="keywordflow">if</span>(<a class="code" href="classturn_1_1StunMsg.html#a52a1a6acd969948c4c589b0023091cbb">_deallocate</a> &amp;&amp; <a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a>) {
                        turn_free(<a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a>, <a class="code" href="classturn_1_1StunMsg.html#aa66cd88412cd71f7edaf5189eba2ab44">_allocated_sz</a>);
                }
        }
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ad187176401ef8f1a7a09caef24aeb510"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classturn_1_1StunMsg.html#ad187176401ef8f1a7a09caef24aeb510">turn::StunMsg::addAttr</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classturn_1_1StunAttr.html">StunAttr</a> &amp;&#160;</td>
          <td class="paramname"><em>attr</em></td><td>)</td>
          <td>  throw (<a class="el" href="classturn_1_1WrongStunAttrFormatException.html">WrongStunAttrFormatException</a>, <a class="el" href="classturn_1_1WrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Add attribute to the message </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00702">702</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                                        {
                <span class="keywordflow">return</span> attr.addToMsg(*<span class="keyword">this</span>);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a3c4002d2c562f1137324c9d302e8e8e2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classturn_1_1StunMsg.html#a3c4002d2c562f1137324c9d302e8e8e2">turn::StunMsg::addFingerprint</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>  throw (<a class="el" href="classturn_1_1WrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Add fingerprint to the message </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00729">729</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                    {
                <span class="keywordflow">if</span>(!<a class="code" href="classturn_1_1StunMsg.html#ac00be2fea5b4ab929ea6078871ec33d8">_constructed</a> || !<a class="code" href="classturn_1_1StunMsg.html#ac4eb10588a98f213876635943bdb358c">isCommand</a>())
                        <span class="keywordflow">throw</span> WrongStunBufferFormatException();
                <a class="code" href="ns__turn__msg_8h.html#aa55f64405c3498fc12b22bb7da4393d7">stun_attr_add_fingerprint_str</a>(<a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a>,&amp;<a class="code" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">_sz</a>);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ae3344d108a2e688e2633b40d835ba9ec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classturn_1_1StunMsg.html#ae3344d108a2e688e2633b40d835ba9ec">turn::StunMsg::addMessageIntegrity</a> </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>uname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>realm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>upwd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>nonce</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>  throw (<a class="el" href="classturn_1_1WrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Adds message integrity data to the message. </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00749">749</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                      {

                <span class="keywordflow">if</span>(!<a class="code" href="classturn_1_1StunMsg.html#ac00be2fea5b4ab929ea6078871ec33d8">_constructed</a> || !<a class="code" href="classturn_1_1StunMsg.html#ac4eb10588a98f213876635943bdb358c">isCommand</a>())
                        <span class="keywordflow">throw</span> WrongStunBufferFormatException();

                <a class="code" href="ns__turn__msg_8h.html#a6f10d977a056cc8f58b7642ed1255cb6">stun_attr_add_integrity_by_user_str</a>(<a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a>, &amp;<a class="code" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">_sz</a>,
                        (u08bits *)uname.c_str(), (u08bits *)realm.c_str(), (u08bits *)upwd.c_str(), (u08bits *)nonce.c_str());
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a9c6452d0d71052a0bda4ded876cc43ea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classturn_1_1StunMsg.html#a9c6452d0d71052a0bda4ded876cc43ea">turn::StunMsg::check</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Implemented in <a class="el" href="classturn_1_1StunMsgChannel.html#a66a94265dda2a2db0dc8565359c861b0">turn::StunMsgChannel</a>, <a class="el" href="classturn_1_1StunMsgIndication.html#ad31f4bc0d4c88b0eb815bb72094d0b2a">turn::StunMsgIndication</a>, <a class="el" href="classturn_1_1StunMsgResponse.html#a64b9f523cdd3558837bc15e193ce336a">turn::StunMsgResponse</a>, and <a class="el" href="classturn_1_1StunMsgRequest.html#a670d1c36082b90e60705436ce0befeff">turn::StunMsgRequest</a>.</p>

</div>
</div>
<a class="anchor" id="a82e38b948a20bbd09d59fa74463edb3a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classturn_1_1StunMsg.html#a82e38b948a20bbd09d59fa74463edb3a">turn::StunMsg::checkFingerprint</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check the fingerprint </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00695">695</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                 {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a8bd3ed5e7a38ef21a43b12b66f9d8e4c">stun_is_command_message_full_check_str</a>(buffer, sz, 1);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="af76ec74762ba24d09beef357fee27369"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classturn_1_1StunMsg.html#af76ec74762ba24d09beef357fee27369">turn::StunMsg::checkMessageIntegrity</a> </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>uname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>realm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>upwd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const  throw (<a class="el" href="classturn_1_1WrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check message integrity, in secure communications. </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00738">738</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                      {
                <span class="keywordflow">if</span>(!<a class="code" href="classturn_1_1StunMsg.html#ac00be2fea5b4ab929ea6078871ec33d8">_constructed</a> || !<a class="code" href="classturn_1_1StunMsg.html#ac4eb10588a98f213876635943bdb358c">isCommand</a>())
                        <span class="keywordflow">throw</span> WrongStunBufferFormatException();
                <span class="keywordflow">return</span> (0 == <a class="code" href="ns__turn__msg_8h.html#ac915712e78913a408369413315127a5f">stun_check_message_integrity_str</a>(<a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a>, <a class="code" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">_sz</a>,
                                (u08bits *)uname.c_str(), (u08bits *)realm.c_str(), (u08bits *)upwd.c_str()));
        }
</pre></div>
</div>
</div>
<a class="anchor" id="abb2d8ac6f2849f158d58a6405c275f54"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classturn_1_1StunMsg.html#abb2d8ac6f2849f158d58a6405c275f54">turn::StunMsg::construct</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initialize buffer </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00598">598</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                         {
                <a class="code" href="classturn_1_1StunMsg.html#a15530c575e485a35f4d87ba7e117d195">constructBuffer</a>();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a15530c575e485a35f4d87ba7e117d195"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classturn_1_1StunMsg.html#a15530c575e485a35f4d87ba7e117d195">turn::StunMsg::constructBuffer</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Implemented in <a class="el" href="classturn_1_1StunMsgChannel.html#a8ae19badff2d03f509711e0facd4041e">turn::StunMsgChannel</a>, <a class="el" href="classturn_1_1StunMsgIndication.html#ad096b14fa48e468ba4b1e944eca01c27">turn::StunMsgIndication</a>, <a class="el" href="classturn_1_1StunMsgResponse.html#ad75a2b4892d6ddae86da0fb4d0aebbba">turn::StunMsgResponse</a>, and <a class="el" href="classturn_1_1StunMsgRequest.html#aaa0f5e09aa1ea41c740d7ea90f41f7e7">turn::StunMsgRequest</a>.</p>

</div>
</div>
<a class="anchor" id="ad38c6413489bc2da2e97b661969a5df4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u08bits* <a class="el" href="classturn_1_1StunMsg.html#ad38c6413489bc2da2e97b661969a5df4">turn::StunMsg::getRawBuffer</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>get raw buffer </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00612">612</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                {
                <span class="keywordflow">return</span> <a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a>;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a0729732bfa90be8239a4c662cf24f0af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classturn_1_1StunMsg.html#a0729732bfa90be8239a4c662cf24f0af">turn::StunMsg::getSize</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get message size in the buffer (message can be mnuch smaller than the whole buffer) </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00619">619</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                               {
                <span class="keywordflow">return</span> <a class="code" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">_sz</a>;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="aaf2fca4a2160e482b64c6cc076084124"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="structstun__tid.html">stun_tid</a> <a class="el" href="classturn_1_1StunMsg.html#aaf2fca4a2160e482b64c6cc076084124">turn::StunMsg::getTid</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const  throw (<a class="el" href="classturn_1_1WrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get transaction ID </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00709">709</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                              {
                <span class="keywordflow">if</span>(!<a class="code" href="classturn_1_1StunMsg.html#ac00be2fea5b4ab929ea6078871ec33d8">_constructed</a> || !<a class="code" href="classturn_1_1StunMsg.html#ac4eb10588a98f213876635943bdb358c">isCommand</a>())
                        <span class="keywordflow">throw</span> WrongStunBufferFormatException();
                <a class="code" href="structstun__tid.html">stun_tid</a> tid;
                <a class="code" href="ns__turn__msg_8h.html#a49eaa17067381e5a8bb87032689c9215">stun_tid_from_message_str</a>(<a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a>,<a class="code" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">_sz</a>,&amp;tid);
                <span class="keywordflow">return</span> tid;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a652f008b8556b550184be4c1f7126129"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classturn_1_1StunMsg.html#a652f008b8556b550184be4c1f7126129">turn::StunMsg::isChallengeResponse</a> </td>
          <td>(</td>
          <td class="paramtype">const u08bits *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>err_code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>err_msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>err_msg_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>realm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>nonce</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if the raw buffer is a challenge response (the one with 401 error and realm and nonce values). </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00666">666</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                        {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a0fd8b30d2c2684c12355a1f416d0be71">stun_is_challenge_response_str</a>(buf, sz, &amp;err_code, err_msg, err_msg_size, realm, nonce);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ad3afc9794256ca780b3b2446b668af78"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classturn_1_1StunMsg.html#ad3afc9794256ca780b3b2446b668af78">turn::StunMsg::isChannel</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if the message is a channel message </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00675">675</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                          {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a1751b7757b11749c6a75a13e4f444e49">is_channel_msg_str</a>(buffer, sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ac862fc959f44ef8287e6374e55580a0d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classturn_1_1StunMsg.html#ac862fc959f44ef8287e6374e55580a0d">turn::StunMsg::isCommand</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if the raw buffer is a TURN "command" (request, response or indication). </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00635">635</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                          {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a0ec34e642f8cbf785ecef76f7fb0d87b">stun_is_command_message_str</a>(buffer, sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ac4eb10588a98f213876635943bdb358c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classturn_1_1StunMsg.html#ac862fc959f44ef8287e6374e55580a0d">turn::StunMsg::isCommand</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if the current message object is a "command" (request, response, or indication). </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00642">642</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                               {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a0ec34e642f8cbf785ecef76f7fb0d87b">stun_is_command_message_str</a>(<a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a>, <a class="code" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">_sz</a>);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a208cd843b0457ca8b7282d64fde0b0d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classturn_1_1StunMsg.html#a208cd843b0457ca8b7282d64fde0b0d1">turn::StunMsg::isErrorResponse</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>err_code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>err_msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>err_msg_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00658">658</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                              {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#ac73cfbf0bdd56b17d57927aefa7673d8">stun_is_error_response_str</a>(buffer, sz, &amp;err_code, err_msg, err_msg_size);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a86040d4a52cc5748adaef171dc130f43"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classturn_1_1StunMsg.html#a86040d4a52cc5748adaef171dc130f43">turn::StunMsg::isFingerprintPresent</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if the fingerprint is present. </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00682">682</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                     {
                <span class="keywordflow">if</span>(!<a class="code" href="ns__turn__msg_8h.html#a0ec34e642f8cbf785ecef76f7fb0d87b">stun_is_command_message_str</a>(buffer,sz))
                        <span class="keywordflow">return</span> <span class="keyword">false</span>;
                <a class="code" href="ns__turn__msg_8h.html#ad78e84b431d789f6799b3dabf786e032">stun_attr_ref</a> sar = <a class="code" href="ns__turn__msg_8h.html#a05ac5979839241de8b46e4ebdc145722">stun_attr_get_first_by_type_str</a>(buffer, sz, STUN_ATTRIBUTE_FINGERPRINT);
                <span class="keywordflow">if</span>(!sar)
                        <span class="keywordflow">return</span> <span class="keyword">false</span>;

                <span class="keywordflow">return</span> <span class="keyword">true</span>;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a4cf1d3727ffd8e2c09e834f30c91db30"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classturn_1_1StunMsg.html#a4cf1d3727ffd8e2c09e834f30c91db30">turn::StunMsg::isIndication</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00646">646</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                             {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a5eea6f087499dad7e35c950b30b0f5cf">stun_is_indication_str</a>(buffer, sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a9d9c109a0dcb34c63282c2990b4e3616"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classturn_1_1StunMsg.html#a9d9c109a0dcb34c63282c2990b4e3616">turn::StunMsg::isRequest</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00650">650</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                          {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a056f82760a5c80f0bc497872d534045b">stun_is_request_str</a>(buffer, sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="aa4c2c43d46e7fa788a0fa40e1ad38aa4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classturn_1_1StunMsg.html#aa4c2c43d46e7fa788a0fa40e1ad38aa4">turn::StunMsg::isSuccessResponse</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00654">654</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                  {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a94312a39c2c9f79b8f89bc3b70105186">stun_is_success_response_str</a>(buffer, sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="aec1db3118494fb6edc6dc1de9fa06b09"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classturn_1_1StunMsg.html#aec1db3118494fb6edc6dc1de9fa06b09">turn::StunMsg::isValid</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Checks if the message is properly constructed </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00605">605</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                       {
                <span class="keywordflow">return</span> <a class="code" href="classturn_1_1StunMsg.html#a9c6452d0d71052a0bda4ded876cc43ea">check</a>();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a9daf40e77846a41fe503387285d73a01"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classturn_1_1StunMsg.html#a9daf40e77846a41fe503387285d73a01">turn::StunMsg::setSize</a> </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em></td><td>)</td>
          <td>  throw (<a class="el" href="classturn_1_1WrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set message size </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00626">626</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                      {
                <span class="keywordflow">if</span>(sz&gt;<a class="code" href="classturn_1_1StunMsg.html#aa66cd88412cd71f7edaf5189eba2ab44">_allocated_sz</a>)
                        <span class="keywordflow">throw</span> WrongStunBufferFormatException();
                <a class="code" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">_sz</a> = sz;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="afd4f7f0ed495aa38cb005742cbac1991"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classturn_1_1StunMsg.html#afd4f7f0ed495aa38cb005742cbac1991">turn::StunMsg::setTid</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structstun__tid.html">stun_tid</a> &amp;&#160;</td>
          <td class="paramname"><em>tid</em></td><td>)</td>
          <td>  throw (<a class="el" href="classturn_1_1WrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set transaction ID </p>

<p>Reimplemented in <a class="el" href="classturn_1_1StunMsgResponse.html#abe1a0fb7b3753d0ced2a47f5052969c6">turn::StunMsgResponse</a>.</p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00720">720</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                 {
                <span class="keywordflow">if</span>(!<a class="code" href="classturn_1_1StunMsg.html#ac00be2fea5b4ab929ea6078871ec33d8">_constructed</a> || !<a class="code" href="classturn_1_1StunMsg.html#ac4eb10588a98f213876635943bdb358c">isCommand</a>())
                        <span class="keywordflow">throw</span> WrongStunBufferFormatException();
                <a class="code" href="ns__turn__msg_8h.html#acf7c497e533584cc5c150839393851bb">stun_tid_message_cpy</a>(<a class="code" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">_buffer</a>, &amp;tid);
        }
</pre></div>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="aa66cd88412cd71f7edaf5189eba2ab44"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classturn_1_1StunMsg.html#aa66cd88412cd71f7edaf5189eba2ab44">turn::StunMsg::_allocated_sz</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00765">765</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0222f924d9fc1b9b268ba87c459dd7fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u08bits* <a class="el" href="classturn_1_1StunMsg.html#a0222f924d9fc1b9b268ba87c459dd7fd">turn::StunMsg::_buffer</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00763">763</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>

</div>
</div>
<a class="anchor" id="ac00be2fea5b4ab929ea6078871ec33d8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classturn_1_1StunMsg.html#ac00be2fea5b4ab929ea6078871ec33d8">turn::StunMsg::_constructed</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00767">767</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>

</div>
</div>
<a class="anchor" id="a52a1a6acd969948c4c589b0023091cbb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classturn_1_1StunMsg.html#a52a1a6acd969948c4c589b0023091cbb">turn::StunMsg::_deallocate</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00764">764</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa3c270c8abbdd22abe101907248754a9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classturn_1_1StunMsg.html#aa3c270c8abbdd22abe101907248754a9">turn::StunMsg::_sz</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00766">766</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/client++/<a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a></li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Tue Jan 22 2013 14:23:55 for TURN Server by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
